<?php

/**
* Game class
* keep information for a game.
* @author dmq (master@dmq.se)
*/
class Game
{
	private $id;
	private $creator;
	private $map;
	private $maxPlayers;
	private $turn;
	private $started;
	private $finished;
	private $players;

	/**
    * The constructor
    * @param $id Int the gameID
    * @param $creator Userobject the creator of the game
    * @param $map Mapobject the map of the game
    * @param $maxPlayers Int the amount of max players of the game
    * @param $turn Int the turn of the game
    * @param $started Boolean status if the game has started or not
    * @param $finished Bollean status if the game is finished or not
    * @param $players Array the players of the game
    */
	public function __construct( $id, $creator, $map, $maxPlayers, $turn, $started, $finished, $players )
	{
		$this->id = $id;
		$this->creator = $creator;
		$this->map = $map;
		$this->maxPlayers = $maxPlayers;
		$this->turn = $turn;
		$this->started = $started;
		$this->finished = $finished;
		$this->players = $players;
	}

	/**
	* function id
	* @return returns the gameID
	*/
	public function id()
	{
		return $this->id;
	}


	/**
	* function creator
	* @return returns the creator of the game
	*/
	public function creator()
	{
		return $this->creator;
	}

	/**
	* function map
	* @return returns a map that is selected for the game
	*/
	public function map()
	{
		return $this->map;
	}

	/**
	* function maxPlayers
	* @return returns the maximum number of players
	*/
	public function maxPlayers()
	{
		return $this->maxPlayers;
	}

	/**
	* function turn
	* @return returns the turn of the game
	*/
	public function turn()
	{
		return $this->turn;
	}

	/**
	* function started
	* @return returns the status if game has startet or not
	*/
	public function started()
	{
		return $this->started;
	}

	/**
	* function finished
	* @return returns the status if the game is finished or not
	*/
	public function finished()
	{
		return $this->finished;
	}

	/**
	* function players
	* @return returns the players of the game
	*/
	public function players()
	{
		return $this->players;
	}
}
